package controllers;

import java.util.ArrayList;

public class CustomerController {
    public static int insert(entity.Customer customer){
       return new  dao.Customer().addCustomer(customer.getName(),customer.getAddress(),
                                           customer.getAge(),customer.getGender(),
                                           customer.getCountry(),customer.getId_card(),
                                           customer.getId_team(),customer.getPhone());         
    }
    public static boolean update(entity.Customer customer){
        return new  dao.Customer().updateCustomer(customer.getId(),customer.getName(),customer.getAddress(),
                                           customer.getAge(),customer.getGender(),
                                           customer.getCountry(),customer.getId_card(),
                                           customer.getId_team(),customer.getPhone());
        
    }
    public static boolean remove(int id){
        return new dao.Customer().deleteCustomer(id); 
    }
    public static ArrayList<entity.Customer> getAll(){
        return new dao.Customer().getAllCustomer();
    }
    public static ArrayList<entity.Customer> findName(String name){
        return new dao.Customer().findCustomer(name);
    }
    public static ArrayList<entity.Customer> findIdcard(int id){
        return new dao.Customer().findIdCard(id);
    }
    public static ArrayList<entity.Customer> findRoom(String room){
        return new dao.Booking().FindCustomerByRoom(room);
    }
    public static ArrayList<entity.Customer> findDate(String date){
        return new dao.InfoBooking().findByDate(date);
    }
    
       
}
